package com.xzzz.irda.guardcat.core.metric.tomcat;

/**
 * Tomcat 中 DispatcherServlet 的信息
 *
 * @author xzzz
 * @since 1.0.0
 */
public class TomcatDispatcherServletInfo {
    /**
     * servlet 的类名
     */
    private String servletClass;

    /**
     * 是否为单线程模式
     */
    private Boolean singleThreadModel;

    /**
     * 是否异步支持
     */
    private Boolean asyncSupported;

    /**
     * 请求次数
     */
    private Integer requestCount;

    /**
     * 请求失败次数
     */
    private Integer errorCount;

    /**
     * 处理时间
     */
    private Long processingTime;

    /**
     * 最短处理时间
     */
    private Long minTime;

    /**
     * 最长处理时间
     */
    private Long maxTime;

    /**
     * 最大实例数
     */
    private Integer maxInstances;


    public String getServletClass() {
        return servletClass;
    }

    public void setServletClass(String servletClass) {
        this.servletClass = servletClass;
    }

    public Boolean getSingleThreadModel() {
        return singleThreadModel;
    }

    public void setSingleThreadModel(Boolean singleThreadModel) {
        this.singleThreadModel = singleThreadModel;
    }

    public Boolean getAsyncSupported() {
        return asyncSupported;
    }

    public void setAsyncSupported(Boolean asyncSupported) {
        this.asyncSupported = asyncSupported;
    }

    public Integer getRequestCount() {
        return requestCount;
    }

    public void setRequestCount(Integer requestCount) {
        this.requestCount = requestCount;
    }

    public Integer getErrorCount() {
        return errorCount;
    }

    public void setErrorCount(Integer errorCount) {
        this.errorCount = errorCount;
    }

    public Long getProcessingTime() {
        return processingTime;
    }

    public void setProcessingTime(Long processingTime) {
        this.processingTime = processingTime;
    }

    public Long getMinTime() {
        return minTime;
    }

    public void setMinTime(Long minTime) {
        this.minTime = minTime;
    }

    public Long getMaxTime() {
        return maxTime;
    }

    public void setMaxTime(Long maxTime) {
        this.maxTime = maxTime;
    }

    public Integer getMaxInstances() {
        return maxInstances;
    }

    public void setMaxInstances(Integer maxInstances) {
        this.maxInstances = maxInstances;
    }

    @Override
    public String toString() {
        return "TomcatDispatcherServletInfo{" +
                "servletClass='" + servletClass + '\'' +
                ", singleThreadModel=" + singleThreadModel +
                ", asyncSupported=" + asyncSupported +
                ", requestCount=" + requestCount +
                ", errorCount=" + errorCount +
                ", processingTime=" + processingTime +
                ", minTime=" + minTime +
                ", maxTime=" + maxTime +
                ", maxInstances=" + maxInstances +
                '}';
    }
}
